package com.fatmeraid.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    PARAM_ERROR(202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    ILLEGAL_REQUEST(205, "非法请求"),
    REPEAT_SUBMIT(206, "重复提交"),
    DELETE_ERROR(207, "请先删除子集"),

    ADMIN_ACCOUNT_EXIST_ERROR(301, "账号已存在"),
    ADMIN_CAPTCHA_CODE_ERROR(302, "验证码错误"),
    ADMIN_CAPTCHA_CODE_EXPIRED(303, "验证码已过期"),
    ADMIN_CAPTCHA_CODE_NOT_FOUND(304, "未输入验证码"),


    ADMIN_LOGIN_AUTH(305, "未登陆"),
    ADMIN_ACCOUNT_NOT_EXIST_ERROR(306, "账号不存在"),
    ADMIN_ACCOUNT_ERROR(307, "用户名或密码错误"),
    ADMIN_ACCOUNT_DISABLED_ERROR(308, "该用户已被禁用"),
    ADMIN_ACCESS_FORBIDDEN(309, "无访问权限"),
    // 旧密码错误
    ADMIN_OLD_PASSWORD_ERROR(310, "旧密码错误"),
    // 新密码不能与旧密码相同
    ADMIN_NEW_PASSWORD_ERROR(311, "新密码不能与旧密码相同"),
    // 密码不能为空
    ADMIN_PASSWORD_NOT_EMPTY(312, "密码不能为空"),
    // 用户已经存在
    ADMIN_USER_EXIST(313, "用户已经存在"),


    TOKEN_EXPIRED(601, "token过期"),
    TOKEN_INVALID(602, "token非法"),

    ADMIN_USERNAME_ALREADY_EXISTS(310, "用户名已存在"),
    ADMIN_USER_NOT_EXIST(311, "用户不存在"),

    ADMIN_USER_INCOMPLETE_INPUT(312, "输入不完整");







    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
